<!DOCTYPE html>
<html lang="zh-cn">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>单页面应用</title>
    <!-- link标签加上common属性 将全局使用 -->
    <link rel="stylesheet" common href="layui/css/layui.css">
    <script src="layui/layui.js"></script>
    <script>
        // 配置
        layui.config({
            base: "model/",
        }).use(["app"], function () {
            var app = layui.app
            
            //渲染
            app.render({
                index: "home",// 默认渲染首页
                page: "page/",// 默认渲染page目录
                view: "main-view",//渲染main-view标签
            })

        })
    </script>
</head>

<body>
    <main-view></main-view>
</body>

</html>